home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Sample Code / Snippets / Interapplication Communication / SuspendAppleEvent / SuspendEvent.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-26  |  2.2 KB  |  69 lines  |  [TEXT/MPS ]

  1. #include <Types.h>
  2. #include <memory.h>
  3. #include <Packages.h>
  4. #include <Errors.h>
  5. #include <quickdraw.h>
  6. #include <fonts.h>
  7. #include <dialogs.h>
  8. #include <windows.h>
  9. #include <menus.h>
  10. #include <events.h>
  11. #include <OSEvents.h>
  12. #include <Desk.h>
  13. #include <diskinit.h>
  14. #include <OSUtils.h>
  15. #include <resources.h>
  16. #include <toolutils.h>
  17. #include <AppleEvents.h>
  18. #include <EPPC.h>
  19. #include <GestaltEqu.h>
  20. #include <PPCToolbox.h> 
  21. #include <Processes.h>
  22. #include <Balloons.h>
  23. #include <aliases.h>
  24.  
  25. /* windowControl is the structure attached to every window I create (in the refCon */
  26. /* field) that contains all the information I need to know about the window. */
  27. /* data, procedure pointers for controlling, and anything else gets put in this */
  28. /* struct.  That makes my windows autonomous */
  29. struct windowControl {
  30.     unsigned long windowID;                                 /* master ID number  */
  31.     ProcPtr drawMe;                                         /* content drawing procedure pointer */
  32.     ProcPtr clickMe;                                        /* content click routine */
  33.     ProcPtr closeMe;                                        /* document close procedure pointer */
  34.     ProcPtr sizeMe;                                            /* size procedure */
  35.     AliasHandle fileAliasHandle;                            /* alias for this document */
  36.     Boolean windowDirty;
  37.     Handle generalData;                                        /* cast to whatever you need as you need it */
  38. };
  39. typedef struct windowControl windowControl, *windowCPtr, **windowCHandle;
  40.  
  41. struct AEinstalls {
  42.     AEEventClass theClass;
  43.     AEEventID theEvent;
  44.     EventHandlerProcPtr theProc;
  45. };
  46. typedef struct AEinstalls AEinstalls;
  47.  
  48. enum {kDocWindowResID = 128,kMyDocumentWindow = 1000};
  49. /* menu enums */
  50. enum {kMBarID = 128};
  51. enum {kAppleMenu = 128,kFileMenu,kEditMenu,kToolsMenu};
  52.  
  53. /* file menu enums */
  54. enum {kNewItem = 1,kOpenItem,kCloseItem,kSaveItem,kSaveAsItem,kFileBlank1,kPageSetupItem,kPrintItem,kFileBlank2,kQuitItem};
  55.  
  56. /* general purpose enums */
  57. enum {kResumeMask=1,kSampHelp=129,kAboutBox=128,kHelpString=128,kBadSystem=130};
  58.  
  59. enum {kMinHeight = 200};
  60.  
  61. enum {kGeneralStrings=128};
  62. enum {kPendingWords1=1,kPendingWords2};
  63.  
  64.  
  65.  
  66. #define kSuspCreator 0x11171915
  67.  
  68. #define kFredDocType 'FRED'
  69. #define kAlDocType 'AL  '